package com.hyts.reactor.handler.reactor;

import com.hyts.reactor.handler.subcribe.ArraySubscription;
import com.hyts.reactor.handler.subcribe.Subscriber;
import lombok.AllArgsConstructor;

/**
 * project-name:coffice-toolbox
 * package-name:com.hyts.reactor.handler.reactor
 * author:Libo/Alex
 * create-date:2019-06-25 15:35
 * email:liboware@gmail.com
 * description:此类主要用于: reactor array数组操作的构建器
 */
@AllArgsConstructor
public class ReactorArrayProductor<T> extends ReactorProducer<T> {

    /**
     * 数组对象集合
     */
    private T[] arrayElement;


    @Override
    protected void register(Subscriber<? super T> subscriber) {
        subscriber.onSubscribe(new ArraySubscription<T>(subscriber,arrayElement));
    }
}
